#ifndef SRTRANSACTIONWIDGET_H
#define SRTRANSACTIONWIDGET_H

#include <QWidget>
#include "srwithdrawcashauditwidget.h"
class QHBoxLayout;
class QVBoxLayout;
class QLabel;
class SRTransactionWidget : public QWidget
{
    Q_OBJECT
public:


public:
    explicit SRTransactionWidget(QWidget *parent = 0);


    void setAuditId(const QString& _auditId);

    void setAuditData(const QString& _data);

    void setViewData(QList<SRWithdrawCashAuditWidget::stWithdrawCash>& _listTransaction);


    static QString convertCoin(qlonglong coin, bool _roundOff = false);

    static QString modifyAuditDataValueToString(QString _data);
signals:

public slots:

    void onUpdate(void);

protected:

    virtual void showEvent(QShowEvent *event);


    QWidget* createTransaction(const QString &addr,
                               const QString &money,
                               QWidget *parent = 0);





private:


private:
    QLabel* labVinTitle_;
    QLabel* labVinSumMoney_;
    QLabel* labVoutTitle_;
    QLabel* labVoutSumMoney_;

    QList<QWidget*> listVinWidget_;
    QList<QWidget*> listVoutWidget_;



    QString auditId_;
    QString auditData_;

    // addr : money
    QString txid_;
    std::multimap<QString, QString> mapVin_;
    std::multimap<QString, QString> mapVout_;


    QWidget* wdgtVin_;
    QWidget* wdgtVout_;

    QVBoxLayout* layoutVin_;
    QVBoxLayout* layoutVout_;
    QWidget *mainWdgt;

};

#endif // SRTRANSACTIONWIDGET_H
